package constructor;

public class Car {
	private String make;
	private String model;
	private String color;
	private int year;
	private int maxSpeed;
	private int currentSpeed;
	
	
	Car(String make, String model, int year, String color)
	{
		this.make = make;
		this.model = model;
		this.year = year;
		this.color = color;
	}
	
	
    public String getColor() {
		return color;
	}


	public void setColor(String color) {
		this.color = color;
	}


	public String getMake() {
		return make;
	}


	public String getModel() {
		return model;
	}


	public int getYear() {
		return year;
	}


 void hasStarted()
    {
	 System.out.println("The car has been started ");
    }
    
   
     int accelerate(int howMuch)
    {
    	 int wishfulSpeed = currentSpeed + howMuch;
    	 if(wishfulSpeed > maxSpeed)
    		 currentSpeed = maxSpeed;
    	 else
    		 currentSpeed = wishfulSpeed;
    	 
    	 return currentSpeed;
    }
}
